<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ page import="java.util.ArrayList" %>
<%@ page import="modelo.Disciplina" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Sistema de Gerador de Provas</title>
</head>
<body>

<h1>Sistema Gerador de Provas</h1>

<h2>Disciplinas</h2>


<%
ArrayList<Disciplina> disciplinas = (ArrayList<Disciplina>)request.getSession().getAttribute("disciplinas");

if (disciplinas != null && disciplinas.size() > 0){
%>
<table border="1" cellpadding="3" cellspacing="0">
<%
for (int i=0 ; i < disciplinas.size() ; i++){
%>
   <tr>
      <td><strong><%=disciplinas.get(i).getNome()%> (<%=disciplinas.get(i).getCodigo()%>)</strong></td>
      <td>[<a href="entrada?acao=formAlterarDisciplina&idDisciplina=<%=i%>">Alterar</a>]</td>
      <td>[<a href="entrada?acao=excluirDisciplina&idDisciplina=<%=i%>">Excluir</a>]</td>
      
      
      
      <td>[<a href="entrada?acao=listarTopicos&idDisciplina=<%=i%>">Listar T&oacute;picos</a>]</td>
      <td>[<a href="entrada?acao=listarQuestoes&idDisciplina=<%=i%>">Listar Quest&otilde;es</a>]</td>      
      
   </tr>
   
<%
}
%>
</table>
<%
}
%>

<p><a href="entrada?acao=formIncluirDisciplina">Incluir nova Disciplina</a></p>

</body>
</html>